<include file="public/header"/>
<link rel="stylesheet" href="//at.alicdn.com/t/font_n5ja3ohdjxl84cxr.css"/>
<style>
    .w-box {
        width:100%;
        color:#333;
        background: #fff;
        margin:0 auto;
        padding: 5px;
        margin-bottom: 10px;
        font-size:12px;
    }
   
   .w-box .w-hd{
        font-size:12px;
        text-align:left;
   }
   .w-box .w-bd{
        font-size:20px;
   }
   .w-box .w-foot{
        color:#999;
        line-height: 20px
   }
    .w-li{
        background: #fff;
        margin-top:10px;
        display: flex;
        padding:0px 5px;
        width: 100%;
   }
   .w-li .iconfont{
        width:30px;
        text-align: center;
   }
   .w-li dl{flex: 1;display: flex;justify-content:space-between}
   .w-li dl dd{color:#666;}
   .layui-layer-btn a{font-size:13px;}
</style>
<body style="background:#eee">
<header>
  <div class="tab_nav">
    <div class="header">
      <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
      <div class="h-mid">解冻押金</div>
      <div class="h-right">
        <aside class="top_bar">
          <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
        </aside>
      </div>
    </div>
  </div>
</header>
<include file="public/menu"/>
<div id="tbh5v0">
    <div class="pbox">
        <!-- 积分标头 S -->
        <div class="w-box">
                <div class="w-hd">分销押金(元)</div>
                <div class="w-bd">{$user.frozen_money}</div>
                <div class="w-foot">注意：1.押金解冻后，将降至最低分销等级。<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.押金将直接解冻至账户余额,可从余额中提现。</div>
        </div>
        <!-- 积分标头 E -->
        <div class="w-li">
         <span class="iconfont icon-hezuofenxiaoshang" style="color:#2AA0F8"></span><dl><dt>分销商等级</dt><dd>{$profit_name}</dd></dl>
        </div>
        <div style="height:30px"></div>
        <if condition="$user['distribut_money'] gt 0">
         <input type="button" value="确认解冻" class="btn_big1" onclick="checkTime()"/>
       <else/>
        <input type="button" value="尚未有可解冻资金" class="btn_big1" style="background:#ccc" disabled="true"/>
       </if>
        </div>
<script>

</script>            
   <include file="public/footer_nav"/>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
function checkTime(){
    var url = "{:U('User/AjaxTime')}";
    layer.confirm('您确认解冻分销押金吗？', {
      btn: ['确认','不解冻了'] //按钮
    }, function(){
        $.ajax({
            type:'GET',
            url:url,
            success:function(data){
                if(data == '0'){
                    layer.msg('您并没充值，无法进行提取');
                    return false;
                }
                if(data == '1'){
                    layer.msg('提取时间不足，无法进行提取');
                    return false;
                }
                if(data == '2'){
                    layer.msg('押金解冻成功!请在余额中查收。',{icon: 1});
                    setTimeout(function(){
                        location.reload() 
                    },2000)
                    return false;
                }
            }
        });
    }, function(){
    });
    
    
}


</script>
</body>
</html>

